<div class="main_body" id="main_body">
    <div class="breadcrub">
        当前位置：文章管理>文章列表
    </div>
    <div class="pannel">
        <span class="sel_label">请选择文章分类：</span>
        <form id="froms" method="get" action="/api/index">
            <select name="select" id="select" class="sel_opt">
                <option></option>
                {{range .types}}
                    <option>{{.Title}}</option>
                {{end}}
            </select>
        </form>


        <table class="common_table">
            <tr>
                <th width="43%">文章标题</th>
                <th width="10%">文章内容</th>
                <th width="16%">添加时间</th>
                <th width="7%">阅读量</th>
                <th width="7%">删除</th>
                <th width="7%">编辑</th>
                <th width="10%">文章类型</th>
            </tr>

            {{range .articles}}
                <tr id="trs">
                    <td>{{.Title}}</td>
                    <td><a href="/api/cot?id={{.Id}}">查看详情</a></td>
                    <td>{{.Time}}</td>
                    <td>{{.Count}}</td>
                    <td><a href="/api/del?id={{.Id}}" class="dels">删除</a></td>
                    <td><a href="/api/update?id={{.Id}}">编辑</a></td>
                    <td>{{.ArticleType.Title}}</td>
                </tr>
            {{end}}
        </table>

        <ul class="pagenation">
            <li><a href="/api/index?page=1&select={{.select}}">首页</a></li>
            {{if iFRed .indexPage}}
                <li><a href="/api/index?page={{.indexPage | Red}}&select={{.select}}">上一页 </a></li>
            {{end}}
            {{if iFend .indexPage .pageCount}}
                <li><a href="/api/index?page={{.indexPage | Add}}&select={{.select}}">下一页</a></li>
            {{end}}
            <li><a href="/api/index?page={{.pageCount}}&select={{.select}}">末页</a></li>
            <li>共{{.count}}条记录/共{{.pageCount}}页/当前1页</li>
        </ul>
    </div>
</div>

